/**
 * 
 */
package br.com.ctm.advogadope.negocio.impl;

import java.util.List;

import javax.annotation.security.PermitAll;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.PersistenceException;

import br.com.ctm.advogadope.dao.api.AdvogadoNotificacaoDao;
import br.com.ctm.advogadope.model.Advogado;
import br.com.ctm.advogadope.model.AdvogadoNotificacao;
import br.com.ctm.advogadope.negocio.api.AdvogadoNotificacaoNegocio;
import br.com.framework.negocio.impl.BaseNegocioImpl;

/**
 * @author Cleber
 *
 */
@Stateless
@PermitAll
public class AdvogadoNotificacaoNegocioImpl extends BaseNegocioImpl<AdvogadoNotificacao, AdvogadoNotificacaoDao> implements
		AdvogadoNotificacaoNegocio {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public AdvogadoNotificacaoNegocioImpl() {
	}
	
	@Inject
	protected void setDao(AdvogadoNotificacaoDao dao) {
		super.setDao(dao);
	}

	@Override
	public List<AdvogadoNotificacao> findByAdvogado(Advogado advogado)
			throws PersistenceException {
		AdvogadoNotificacao advNot = new AdvogadoNotificacao();
		advNot.setAdvogado(advogado);
		return this.findByExample(advNot);
	}


}
